package com.ruoyi.business.order.domain;

import com.ruoyi.business.base.JoBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 订单商品对象 jb_order_commodity
 *
 * @author ruoyi
 * @date 2024-10-11
 */
@Data
public class JbOrderCommodity extends JoBaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Excel(name = "主键id")
    private Long orderId;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderNumber;

    /**
     * 类型（0=商品，1=赠品）
     */
    @Excel(name = "类型", readConverterExp = "0=商品，1=赠品")
    private Long type;

    /**
     * 前端用 价格类型
     */
    @Excel(name = "前端用 价格类型")
    private String unitSinglePrice;

    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    private Long commodityId;

    /**
     * 商品规格
     */
    @Excel(name = "商品规格")
    private String commoditySpecification;

    /**
     * 出厂价
     */
    @Excel(name = "出厂价")
    private BigDecimal factoryPrice;
    /**
     * 物流重量
     */
    private BigDecimal logisticsWeight;
    /**
     * 发货箱数
     */
    private BigDecimal numberOfShippingBoxes;

    /**
     * 销售单价（元）
     */
    @Excel(name = "销售单价", readConverterExp = "元")
    @NotNull(message = "金额核算类型不能为空")
    private BigDecimal unitPrice;

    /**
     * 数量
     */
    @Excel(name = "数量")
    @NotNull(message = "申报数量不能为空")
    private BigDecimal quantity;

    /**
     * 小计
     */
    @Excel(name = "小计")
    private BigDecimal subtotal;

    /**
     * 毛利率
     */
    @Excel(name = "毛利率")
    private BigDecimal grossProfitMargin;

    /**
     * 分类id
     */
    @Excel(name = "分类id")
    private Long classifyId;

    /**
     * 产品类型正常品，试验品促销品
     */
    @Excel(name = "产品类型正常品，试验品促销品")
    private String commodityType;

    /**
     * 商品编码可系统生成
     */
    @Excel(name = "商品编码可系统生成")
    private String commodityNumber;

    /**
     * 关联产品id（产品表id）
     */
    @Excel(name = "关联产品id", readConverterExp = "产=品表id")
    private Long productId;

    /**
     * 关联规格ID
     */
    @Excel(name = "关联规格ID")
    private Long specificationId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String commodityName;

    /**
     * 商品ID页面输入
     */
    @Excel(name = "商品ID页面输入")
    private String commodityCode;

    /**
     * 最小单位
     */
    @Excel(name = "最小单位")
    private String minUnit;

    /**
     * 整件数量
     */
    @Excel(name = "整件数量")
    private Long caseQuantity;

    /**
     * 单位含量
     */
    @Excel(name = "单位含量")
    private BigDecimal unitContent;

    /**
     * 含量单位（数据字典）
     */
    @Excel(name = "含量单位", readConverterExp = "数=据字典")
    private String contentUnit;

    /**
     * 商品主图URL
     */
    @Excel(name = "商品主图URL")
    private String mainImageUrl;

    /**
     * 线上拆箱单价
     */
    @Excel(name = "线上拆箱单价")
    private BigDecimal onlineUnitPrice;

    /**
     * 整件单价
     */
    @Excel(name = "整件单价")
    private BigDecimal caseUnitPrice;

    /**
     * 吨价
     */
    @Excel(name = "吨价")
    private BigDecimal tonPrice;

    /**
     * 提成比率
     */
    @Excel(name = "提成比率")
    private BigDecimal commissionRatio;
}
